Component org.nuxeo.audit.service.AuditComponent
In bundle org.nuxeo.ecm.platform.audit
Resolution Order
247
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime
framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.
Start Order
554
(Declared Start Order: 70)
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.
Implementation
Class:
org.nuxeo.audit.service.AuditComponent
Services
- org.nuxeo.audit.service.AuditBackend
- org.nuxeo.audit.service.AuditRouter
- org.nuxeo.audit.service.AuditService
Extension Points
XML Source
<?xml version="1.0"?>
<component name="org.nuxeo.audit.service.AuditComponent">
<implementation class="org.nuxeo.audit.service.AuditComponent" />
<service>
<!-- @deprecated since 2025.16, default audit backend should be explicitly retrieved from AuditService -->
<provide interface="org.nuxeo.audit.service.AuditBackend" />
<provide interface="org.nuxeo.audit.service.AuditRouter" />
<provide interface="org.nuxeo.audit.service.AuditService" />
</service>
<extension-point name="event">
<documentation>
This service registers auditable events.
<p />
Registered events are dummy strings for now.
<p />
This service is used to filter auditable events from the JMS topic based
on their names. The following XML snipset give figures out how the default
event types are selected for auditing.
<programlisting>
<extension target="org.nuxeo.audit.service.AuditComponent" point="event">
<event name="documentCreated" />
<event name="documentCreatedByCopy" />
<event name="documentDuplicated" />
<event name="documentMoved" />
<event name="documentRemoved" />
<event name="documentModified" />
<event name="documentLocked" />
<event name="documentUnlocked" />
<event name="documentSecurityUpdated" />
<event name="lifecycle_transition_event" />
<event name="documentTrashed" />
<event name="documentUntrashed" />
</extension>
</programlisting>
@deprecated since 2025.16, use routes + extendedInfo extension points instead
</documentation>
<object class="org.nuxeo.audit.service.extension.EventDescriptor" />
</extension-point>
<extension-point name="routes">
<documentation>
Allows to register audit routes for log entry backend storage location.
<p />
A route is basically composed of a backend name and a list of events to forward to this backend.
<p />
Such routes also register the events to convert to log entries that will later be routed to backends.
<programlisting>
<extension target="org.nuxeo.audit.service.AuditComponent" point="routes">
<route name="default">
<backend name="default" />
<event name="documentCreated" />
<event name="documentModified" enabled="true" />
</route>
</extension>
</programlisting>
<p />
A route can also be composed of a backend name and a list of predicates.
<p />
Such routes don't register events to convert to log entries, they only act at backend routing layer.
<programlisting>
<extension target="org.nuxeo.audit.service.AuditComponent" point="routes">
<route name="documentCategory">
<backend name="default" />
<predicate class="org.nuxeo.audit.service.route.CategoryLogEntryPredicate">
<property name="category">eventDocumentCategory</property>
</predicate>
</route>
</extension>
</programlisting>
<p />
The events and predicates can be combined, they are computed as AND when routing log entries to backends. The OR
combination is achieved by declaring several routes with the same backend. Keep in mind that event conversion is
only done for events registered in live routes.
<p />
A route can be marked as non-live using the <code>live="false"</code> attribute. Non-live routes are excluded from
the automatic ingestion path: they never receive produced entries, and the events they declare are not converted
to log entries unless a live route declares them too. They are meant for administrative operations on existing
entries, such as migration or purge.
<programlisting>
<extension target="org.nuxeo.audit.service.AuditComponent" point="routes">
<route name="archive" live="false">
<backend name="cold" />
<event name="documentCreated" />
</route>
</extension>
</programlisting>
</documentation>
<object class="org.nuxeo.audit.service.extension.AuditRouteDescriptor" />
</extension-point>
<extension-point name="extendedInfo">
<documentation>
This service registered extended info mappings.
<p />
This service is used to evaluate EL expression using document as context
registering results into a map indexed by names.
</documentation>
<object class="org.nuxeo.audit.service.extension.ExtendedInfoDescriptor" />
</extension-point>
<extension-point name="adapter">
<documentation>
register the adapter that will be injected in EL context
</documentation>
<object class="org.nuxeo.audit.service.extension.AdapterDescriptor" />
</extension-point>
<extension-point name="backendFactory">
<documentation>
Allows to register a backend implementation for the Audit Service
</documentation>
<object class="org.nuxeo.audit.service.extension.AuditBackendFactoryDescriptor" />
</extension-point>
</component>